//
//  ProductItem.m
//  Vest_native
//
//  Created by WangZhenyu on 16/12/17.
//  Copyright © 2016年 WangZhenyu. All rights reserved.
//

#import "ProductItem.h"

@implementation ProductItem

-(id)initWithDic:(NSDictionary *)dic
{
    self = [super init];
    if (self)
    {
        self.productId = [NSString stringWithFormat:@"%@", [dic objectForKey:@"id"]];
        self.amount = [dic objectForKey:@"amount"];
        self.amountDisplay = [dic objectForKey:@"amountDisplay"];
        self.applyCount = [NSString stringWithFormat:@"%@人成功贷款", [dic objectForKey:@"applyCount"]];
        self.career = [dic objectForKey:@"career"];
        self.descriptionStr = [dic objectForKey:@"description"];
        self.icon = [dic objectForKey:@"icon"];
        self.interest = [dic objectForKey:@"interest"];
        self.interestDisplay = [dic objectForKey:@"interestDisplay"];
        self.successRate = [dic objectForKey:@"successRate"];
        self.successRateDisplay = [dic objectForKey:@"successRateDisplay"];
        self.tagIcon = [dic objectForKey:@"tagIcon"];
        self.term = [dic objectForKey:@"term"];
        self.title = [dic objectForKey:@"title"];
        self.url = [dic objectForKey:@"url"];
        self.viewCount = [NSString stringWithFormat:@"%@人浏览", [dic objectForKey:@"viewCount"]];
    }
    return self;
}

+(instancetype)productItemDic:(NSDictionary *)dic
{
    return [[self alloc] initWithDic:dic];
    
}
@end
